// 获取时间yyyy-mm-dd hh:mm:ss
export const getYYYYMMDDHHMMSS = (datestr) => {
  let d = new Date(datestr);
  return (
    d.getFullYear() +
    "-" +
    mathzero(d.getMonth() + 1) +
    "-" +
    mathzero(d.getDate()) +
    " " +
    mathzero(d.getHours()) +
    ":" +
    mathzero(d.getMinutes()) +
    ":" +
    mathzero(d.getSeconds())
  );
};
export const mathzero = (num) => (num < 10 ? "0" + num : num);
